package cn.tedu.ivos.vehicle.pojo.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
public class VehicleSaveParam {
    private Long id;
    @ApiModelProperty("品牌")
    private String brand;
    @ApiModelProperty("车牌")
    private String license;
    @ApiModelProperty("型号")
    private String model;
    @ApiModelProperty("唯一物理码")
    private String code;
    @ApiModelProperty("排量")
    private String displacement;
    @ApiModelProperty("种类")
    private String type;
    private String color;
    @ApiModelProperty("里程数")
    private String kilometers;
    @ApiModelProperty("购买时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date buyTime;
    @ApiModelProperty("注册时间")
//    后端接收前端传过来的时间格式为字符串格式，需要将它转为java的Data对象类型
//    而jsonFormat是将java的Data对象类型转为Json格式传给前端
    @DateTimeFormat(pattern = "yyyy-MM-dd")
//    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date regTime;
    @ApiModelProperty("价格")
    private String price;
    @ApiModelProperty("电池类型")
    private String batteryType;

}
